using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.IO;
using UnityEditor;

namespace Reskit
{
	public class AssetBundleExporter : MonoBehaviour
	{
#if UNITY_EDITOR
		[UnityEditor.MenuItem("FrameworkDesign /Build AssetBundle [New]", false)]
		static void BuildAssetBundles()
		{
			var outputPath = Application.streamingAssetsPath + "/AssetBundles/" + ResKitUtil.GetPlatformName();

			if (!Directory.Exists(outputPath))
			{
				Directory.CreateDirectory(outputPath);
			}

			BuildPipeline.BuildAssetBundles(outputPath, BuildAssetBundleOptions.ChunkBasedCompression,
				EditorUserBuildSettings.activeBuildTarget);

			AssetDatabase.Refresh();
		}




#endif



	}

}
